/**
 * @param {number} n
 * @return {string[]}
 */
var fizzBuzz = function(n) {
  let arr = new Array(n);
  for(let i = 0; i < n; i++) {
    if(i === 0) {
      arr[i] = (i + 1).toString();
      continue;
    }
    if((i + 1) % 3 === 0 && (i + 1) % 5 === 0)
      arr[i] = "FizzBuzz";
    else if((i + 1) % 3 === 0)
      arr[i] = "Fizz";
    else if((i + 1) % 5 === 0)
      arr[i] = "Buzz";
    else
      arr[i] = (i + 1).toString();
  }
  return arr;
};
let n = 3;
console.log(fizzBuzz(n));
n = 5;
console.log(fizzBuzz(n));
n = 15;
console.log(fizzBuzz(n));

